package com.netbao.pro.controller;

import com.netbao.model.PageBean;
import com.netbao.model.PageResult;
import com.netbao.model.Result;
import com.netbao.pro.model.WayBill;
import com.netbao.pro.service.WayBillService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/pro/waybill")
public class WayBillController {
    @Resource
    private WayBillService wayBillService;


    @GetMapping("/list")
    public PageResult list(PageBean pageBean, String proName){
        return wayBillService.list(pageBean,proName);
    }

    @PostMapping("/save")
    public Result save(WayBill wayBill){
        return wayBillService.save(wayBill);
    }
}
